package com.baitengsoft.patentapimonitor.api.service;

import com.baitengsoft.patentapimonitor.api.entity.PacIndustryEntity;
import com.baitengsoft.patentapimonitor.api.model.WebIndustryInfo;
import com.baitengsoft.patentapimonitor.common.utils.PageResult;
import com.baitengsoft.patentapimonitor.common.utils.Res;
import com.baitengsoft.patentapimonitor.common.utils.SearchParam;

import java.util.List;
import java.util.Map;

/**
 * Created by QEK on 2017/12/19.
 */
public interface PacIndustryService extends BaseService<PacIndustryEntity> {

    PageResult<PacIndustryEntity> pageSelectPacIndustry(int platformId,SearchParam searchParam);

    Res addPacIndustry(PacIndustryEntity entity);

    PacIndustryEntity queryPacIndustryById(Integer id);

    Res updatePacIndustry(PacIndustryEntity entity);

    Res deletePacIndustry(Integer id);

    //根据平台id获取name和id【下拉框】
    List<WebIndustryInfo> getIndustryInfoByPlatformId(Integer platformId);

    /**
     * 获取本平台下行业Map<id,name>
     */
    Map<Integer,String> getIndustryMapByPlatformId(Integer platformId);

    /**
     * 根据权力人Id查询产业ID
     */
    List<Integer> getIndustryIdByApplicentId(Integer applicantId);

    /**
     * 根据平台Id查询行业Id
     */
    List<Integer> getIndustryIdsByPlatformId(Integer platformid);

    /**
     * 判断行业排序检查是否通过，true通过，false不通过
     */
    boolean checkSortIsExitByPlatformId(Integer platformid, Integer sort);

    /**
     * 删除数据中是否有该行业
     */
    PacIndustryEntity getPacIndustryDeletedByName(Integer platformid,String name);
}
